This analysis looks at the inter-subject correlation in two different ROIs: a bilateral fusiform ROI from the AAL atlas, and a mask of all regions that showed high load > low load activation during the delay period of the DFR task.

In order to get this data, we extracted the model-free BOLD activity and applied minimal pre-processing using SPM8 (removing cosine, filtering, detrend and meaning the value across voxels). From there, we separated the data into trials. Because the data was jittered, decided that the onset of a trial should be considered the TR that contains the onset of the trial. Once we had the individual trials separated, we averaged over high and low load trials separately. Correlations were taken across all common voxels in the given mask for each pair of subjects for the high load trials, which is the data that we are showing below.

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.2.1     ✓ purrr   0.3.3
## ✓ tibble  2.1.3     ✓ dplyr   0.8.3
## ✓ tidyr   1.0.0     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.4.0
## ── Conflicts ────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(dplyr)
library(rmatio)
library(psych)
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
library(ggplot2)
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
library(patchwork)

load("data/behav.RData")

corr_temp <- read.mat("data/ISC_corr.mat")
## Warning in read.mat("data/ISC_corr.mat"): Function class type read as NULL:
suj_corr_fusiform <- corr_temp[["suj_corr"]]
corr_temp <- read.mat("data/ISC_corr_DFR_delay.mat")
## Warning in read.mat("data/ISC_corr_DFR_delay.mat"): Function class type read as
## NULL:
suj_corr_DFR <- corr_temp[["suj_corr"]]

suj_corr_fusiform[is.nan(suj_corr_fusiform)] <- NA
suj_corr_DFR[is.nan(suj_corr_DFR)] <- NA

se <- function(x) {
  sd(x,na.rm=TRUE)/sqrt(length(x[!is.na(x)])) 
}

rects <- data.frame(xstart=c(7),xend=c(9))

source("helper_fxns/avg_ISC.R")
source("helper_fxns/corr_ISC.R")
span_order <- order(constructs_fMRI$omnibus_span_no_DFR_MRI)

fusiform_ISC_ordered <- suj_corr_fusiform[span_order,span_order,]
DFR_ISC_ordered <- suj_corr_DFR[span_order,span_order,]

# select out only subjects who were included in group analyses 

fusiform_ISC_ordered_group <- fusiform_ISC_ordered[c(1:56,58:113,115:170),c(1:56,58:113,115:170),]
DFR_ISC_ordered_group <- DFR_ISC_ordered[c(1:56,58:113,115:170),c(1:56,58:113,115:170),]

# remove NaNs
fusiform_ISC_ordered_group[is.nan(fusiform_ISC_ordered_group)] <- NA
DFR_ISC_ordered_group[is.nan(DFR_ISC_ordered_group)] <- NA
avg_ISC_fusiform <- avg_ISC(suj_corr_fusiform)
avg_ISC_DFR <- avg_ISC(suj_corr_DFR)

overall_avg_ISC_fusiform <- rowMeans(avg_ISC_fusiform)
overall_avg_ISC_DFR <- rowMeans(avg_ISC_DFR)

Fusiform

First looking at the fusiform mask allows us to get a sense as to what the visual cortex is doing. Seeing results here might reflect perceptual representation of the stimuli, and if we see correlations during delay, might suggest that subjects are maintaining the percept of the faces in a similar way.

graph_fusiform <- list()

for (TR in seq.int(1,14)){
  data <- data.frame(fusiform_ISC_ordered_group[,,TR])
  rownames(data) <- c(1:168)
  colnames(data) <- c(1:168)
  data %>%
    
    # Data wrangling
    as_tibble() %>%
    rowid_to_column(var="X") %>%
    gather(key="Y", value="Z", -1) %>% 
    
    # Change Y to numeric
    mutate(Y=as.numeric(gsub("V","",Y))) -> mutated_data
  # 
  ggplot(data=mutated_data,aes(X, Y, fill= Z)) +
    geom_tile() +
    scale_y_continuous(breaks = c(0,50,100,150),labels=c(0,50,100,150))+
    geom_hline(yintercept=56,color="black")+
    geom_hline(yintercept=113,color="black")+
    geom_vline(xintercept=56,color="black")+
    geom_vline(xintercept=113,color="black")+
    scale_fill_gradient2()+
    theme(aspect=1)+
    ggtitle(paste("TR:",TR))-> graph_fusiform[[TR]]
  
  if (TR > 1){
    graph_fusiform[[TR]][["theme"]][["legend.position"]] = "none"
  }
  
}

First, we want to just look at the correlations between subjects over time. We can see that peak intersubject correlations happen around TR 4-6, drop and then get higher around TR 8-9. These TRs correspond to the encoding period and the beginning of the probe period - when there are actually stimuli on the screen.

The lines here represent divisions between groups - subjects are sorted by span, starting with low span at the bottom left corner and moving up and to the right. There doesn’t really seem to be any pattern within or across groups.

(graph_fusiform[[1]]+graph_fusiform[[2]] + graph_fusiform[[3]]) +
  plot_layout(guides = "collect")+
  plot_annotation(title="Fusiform Mask")

(graph_fusiform[[4]] + graph_fusiform[[5]] + graph_fusiform[[6]])

(graph_fusiform[[7]] + graph_fusiform[[8]] + graph_fusiform[[9]])

(graph_fusiform[[10]] + graph_fusiform[[11]] + graph_fusiform[[12]])

(graph_fusiform[[13]] + graph_fusiform[[14]])

z_trans_fusiform <-  atanh(fusiform_ISC_ordered_group)
z_trans_fusiform[z_trans_fusiform==Inf] <- NA
z_trans_corr <- z_trans_fusiform

t_test_res_fusiform = data.frame(matrix(nrow=14,ncol=2)) 
colnames(t_test_res_fusiform) <- c("t value","p value")
cols <- c("low_within","low_across","med_within","med_across","high_within","high_across")

group_means_fusiform <- data.frame(matrix(nrow=14,ncol=6))
colnames(group_means_fusiform) <- cols

group_se_fusiform <- data.frame(matrix(nrow=14,ncol=6))
colnames(group_se_fusiform) <- cols

avg_over_groups_fusiform <- list(mean=data.frame(within = matrix(nrow=14,ncol=1),across = matrix(nrow=14,ncol=1)),
                                 se=data.frame(within = matrix(nrow=14,ncol=1),across = matrix(nrow=14,ncol=1)))

for (TR in seq.int(1:14)){
  
  # define dataframes 
  comps <- data.frame(within = matrix(nrow=168,ncol=1),across = matrix(nrow=168,ncol=1))
  
  
  
  split_by_groups <- data.frame(matrix(nrow=56,ncol=6))
  colnames(split_by_groups) <- cols
  
  # loop over all subjects and make comparisons
  for (suj in seq.int(1,168)){
    if (suj < 57){
      comps$within[suj] <- mean(z_trans_corr[1:56,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[57:168,suj,TR],na.rm=TRUE)
    }else if (suj > 56 & suj < 113){ 
      comps$within[suj] <- mean(z_trans_corr[57:112,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[c(1:56,113:168),suj,TR],na.rm=TRUE)
    }else if (suj > 112){ 
      comps$within[suj] <- mean(z_trans_corr[113:168,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[1:112,suj,TR],na.rm=TRUE)}
    
  }
  
  # average over groups 
  avg_over_groups_fusiform[["mean"]]$within[TR] <- mean(comps$within)
  avg_over_groups_fusiform[["mean"]]$across[TR] <- mean(comps$across)
  avg_over_groups_fusiform[["se"]]$within[TR] <- se(comps$within)
  avg_over_groups_fusiform[["se"]]$across[TR] <- se(comps$across)
  
  avg_over_groups_fusiform[["mean"]]$difference[TR] <- avg_over_groups_fusiform[["mean"]]$within[TR] - avg_over_groups_fusiform[["mean"]]$across[TR]
  avg_over_groups_fusiform[["se"]]$difference[TR] <- se(comps$within - comps$across)
  
  # split by groups 
  split_by_groups$low_across <- comps$across[1:56]
  split_by_groups$low_within <- comps$within[1:56]
  
  split_by_groups$med_across <- comps$across[57:112]
  split_by_groups$med_within <- comps$within[57:112]
  
  split_by_groups$high_across <- comps$across[113:168]
  split_by_groups$high_within <- comps$within[113:168]
  
  group_means_fusiform[TR,] <- colMeans(split_by_groups)
  for (group in seq.int(1,6)){
    group_se_fusiform[TR,group] <- se(split_by_groups[,group])
  }
  temp2 <- t.test(comps$within,comps$across,paired=TRUE,var.equal = FALSE)
  t_test_res_fusiform[TR,] <- c(temp2$statistic,temp2$p.value)
  
}

All time points are significantly different.

print(t_test_res_fusiform)
##     t value      p value
## 1  7.517220 3.250766e-12
## 2  7.849980 4.768215e-13
## 3  7.848735 4.802915e-13
## 4  8.747743 2.273005e-15
## 5  7.447015 4.850177e-12
## 6  7.812660 5.924367e-13
## 7  8.619990 4.929059e-15
## 8  7.227409 1.676167e-11
## 9  7.833776 5.239835e-13
## 10 9.036165 3.903853e-16
## 11 8.283708 3.705993e-14
## 12 7.685563 1.236713e-12
## 13 8.077969 1.253792e-13
## 14 7.637561 1.630710e-12

Next, we want to take a quick sanity check and see how just averaging across all subjects, but looking within and across groups. We see similar time courses to what we were seeing with the full matrices. It is interesting to note that within subject correlations are higher than across subject ones.

plot_temp <- melt(cbind(avg_over_groups_fusiform[["mean"]],time=c(1:14)),id.vars="time")[1:28,]
se_plot_temp <- melt(cbind(avg_over_groups_fusiform[["se"]],time=c(1:14)),id.vars="time")[1:28,]
plot_temp <- merge(plot_temp,se_plot_temp,by=c("time","variable"))
colnames(plot_temp) <- c("time","variable","mean","se")

ggplot(data=plot_temp)+
  geom_line(aes(x=time,y=mean,color=variable))+
  geom_ribbon(aes(x=time,ymin=mean-se,ymax=mean+se,fill=variable),alpha=0.2)+
  ggtitle("Fusiform ISC - regardless of WM group")+
  theme_classic()

The last analysis didn’t take into account the span of the subjects - now we’ll look at them.

Seems as though low capacity subjects show less within group correlation than the other two groups during encoding, but no real differences otherwise.

group_means_fusiform$TR <- c(1:14) 
group_se_fusiform$TR <- c(1:14) 

melted_group <-  melt(group_means_fusiform, id.vars="TR",value.name="mean")
melted_se <- melt(group_se_fusiform,id.vars="TR",value.name="se")

merge(melted_group,melted_se) %>% 
  ggplot()+
  geom_rect(data=rects,aes(xmin=xstart, xmax=xend, ymin = -Inf, ymax=Inf), fill="grey", alpha =0.4,show.legend = FALSE)+
  geom_line(aes(x=TR,y=mean,color=variable))+
  geom_ribbon(aes(x=TR,ymin=mean-se,ymax=mean+se,fill=variable),alpha=0.2)+
  scale_x_continuous(breaks = c(1:14),labels=c(1:14))+
  ggtitle("Fusiform ISC")+
  theme_classic()-> graph

graph

If we average over time, there is a super strong correlation between accuracy and average ISC in the fusiform, but we don’t see that for any other relationship.

data_to_plot <- merge(constructs_fMRI,p200_clinical_zscores, by="PTID")
data_to_plot <- merge(data_to_plot,p200_data[,c(1,7)])

data_to_plot <- cbind(data_to_plot,overall_avg_ISC_fusiform,overall_avg_ISC_DFR)

cor.test(overall_avg_ISC_fusiform,data_to_plot$omnibus_span_no_DFR_MRI)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_fusiform and data_to_plot$omnibus_span_no_DFR_MRI
## t = 1.0317, df = 168, p-value = 0.3037
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07202695  0.22714894
## sample estimates:
##        cor 
## 0.07934751
cor.test(overall_avg_ISC_fusiform,data_to_plot$XDFR_MRI_ACC_L3)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_fusiform and data_to_plot$XDFR_MRI_ACC_L3
## t = 5.5685, df = 168, p-value = 1e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2596474 0.5146711
## sample estimates:
##       cor 
## 0.3947352
cor.test(overall_avg_ISC_fusiform,data_to_plot$WHO_ST_S32)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_fusiform and data_to_plot$WHO_ST_S32
## t = -0.77335, df = 168, p-value = 0.4404
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20820677  0.09177802
## sample estimates:
##         cor 
## -0.05955898
cor.test(overall_avg_ISC_fusiform,data_to_plot$BPRS_TOT)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_fusiform and data_to_plot$BPRS_TOT
## t = -0.75607, df = 168, p-value = 0.4507
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2069336  0.0930971
## sample estimates:
##         cor 
## -0.05823314
ggplot(data=data_to_plot,aes(x=overall_avg_ISC_fusiform,omnibus_span_no_DFR_MRI))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC fusiform vs omnibus span")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_fusiform,XDFR_MRI_ACC_L3))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC fusiform vs L3 DFR Acc")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_fusiform,WHO_ST_S32))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC fusiform vs WHODAS")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_fusiform,BPRS_TOT))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC fusiform vs BPRS Total")

If we break this down by TR, we see signficant linear relationships between ISC and span at TRs 10 and 11, with WHODAS at TR 10 (but I’m not sure I trust this one…) and accuracy at TRs 1, 2, 4, 5, 6, 7, 10, 11, 12, and 13.

Overall, it seems that ISC during probe (and a little bit during encoding) is relate to performance and span.

corr_ISC(avg_ISC_fusiform,data_to_plot[,c(1,7)])
## [1] "TR: 1; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.2683, df = 168, p-value = 0.2064
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05391824  0.24431936
## sample estimates:
##        cor 
## 0.09738635 
## 
## [1] "TR: 2; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.75685, df = 168, p-value = 0.4502
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09303749  0.20699119
## sample estimates:
##        cor 
## 0.05829306 
## 
## [1] "TR: 3; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.24746, df = 168, p-value = 0.8049
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1318047  0.1691166
## sample estimates:
##        cor 
## 0.01908822 
## 
## [1] "TR: 4; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.57404, df = 168, p-value = 0.5667
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1069822  0.1934704
## sample estimates:
##       cor 
## 0.0442445 
## 
## [1] "TR: 5; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.50633, df = 168, p-value = 0.6133
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1121385  0.1884417
## sample estimates:
##        cor 
## 0.03903458 
## 
## [1] "TR: 6; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.44078, df = 168, p-value = 0.6599
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1171262  0.1835624
## sample estimates:
##        cor 
## 0.03398721 
## 
## [1] "TR: 7; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.74526, df = 168, p-value = 0.4572
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09392242  0.20613655
## sample estimates:
##        cor 
## 0.05740332 
## 
## [1] "TR: 8; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.32444, df = 168, p-value = 0.746
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1259652  0.1748791
## sample estimates:
##        cor 
## 0.02502352 
## 
## [1] "TR: 9; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.14285, df = 168, p-value = 0.8866
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1397255  0.1612673
## sample estimates:
##       cor 
## 0.0110205 
## 
## [1] "TR: 10; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.1608, df = 168, p-value = 0.03212
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01428222 0.30735000
## sample estimates:
##      cor 
## 0.164443

## [1] "TR: 11; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.2695, df = 168, p-value = 0.02451
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02254113 0.31481220
## sample estimates:
##       cor 
## 0.1724702

## [1] "TR: 12; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.37686, df = 168, p-value = 0.7068
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1219848  0.1787952
## sample estimates:
##        cor 
## 0.02906309 
## 
## [1] "TR: 13; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.25791, df = 168, p-value = 0.7968
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1698995  0.1310125
## sample estimates:
##         cor 
## -0.01989402
corr_ISC(avg_ISC_fusiform,data_to_plot[,c(1,8)])
## [1] "TR: 1; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.083989, df = 168, p-value = 0.9332
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1568411  0.1441751
## sample estimates:
##         cor 
## -0.00647977 
## 
## [1] "TR: 2; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.35747, df = 168, p-value = 0.7212
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1234574  0.1773474
## sample estimates:
##        cor 
## 0.02756911 
## 
## [1] "TR: 3; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.28112, df = 168, p-value = 0.779
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1292525  0.1716377
## sample estimates:
##        cor 
## 0.02168359 
## 
## [1] "TR: 4; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.56962, df = 168, p-value = 0.5697
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1931424  0.1073189
## sample estimates:
##         cor 
## -0.04390453 
## 
## [1] "TR: 5; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.66307, df = 168, p-value = 0.5082
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2000657  0.1001948
## sample estimates:
##         cor 
## -0.05108995 
## 
## [1] "TR: 6; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.96747, df = 168, p-value = 0.3347
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.22245664  0.07694159
## sample estimates:
##         cor 
## -0.07443467 
## 
## [1] "TR: 7; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.44912, df = 168, p-value = 0.6539
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1841842  0.1164915
## sample estimates:
##         cor 
## -0.03462992 
## 
## [1] "TR: 8; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.069995, df = 168, p-value = 0.9443
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1452322  0.1557878
## sample estimates:
##         cor 
## 0.005400146 
## 
## [1] "TR: 9; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.64648, df = 168, p-value = 0.5189
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1988384  0.1014600
## sample estimates:
##         cor 
## -0.04981498 
## 
## [1] "TR: 10; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -2.8258, df = 168, p-value = 0.005289
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.35223211 -0.06456666
## sample estimates:
##        cor 
## -0.2130108

## [1] "TR: 11; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.2692, df = 168, p-value = 0.2061
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2443870  0.0538465
## sample estimates:
##         cor 
## -0.09745762 
## 
## [1] "TR: 12; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.7545, df = 168, p-value = 0.4516
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20681817  0.09321668
## sample estimates:
##         cor 
## -0.05811292 
## 
## [1] "TR: 13; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.33882, df = 168, p-value = 0.7352
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1248736  0.1759540
## sample estimates:
##        cor 
## 0.02613178
corr_ISC(avg_ISC_fusiform,data_to_plot[,c(1,14)])
## [1] "TR: 1; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.7782, df = 168, p-value = 0.4375
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20856475  0.09140692
## sample estimates:
##         cor 
## -0.05993188 
## 
## [1] "TR: 2; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.38731, df = 168, p-value = 0.699
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1795752  0.1211909
## sample estimates:
##         cor 
## -0.02986822 
## 
## [1] "TR: 3; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.2806, df = 168, p-value = 0.2021
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.24520652  0.05297723
## sample estimates:
##         cor 
## -0.09832101 
## 
## [1] "TR: 4; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.43771, df = 168, p-value = 0.6622
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1173598  0.1833336
## sample estimates:
##        cor 
## 0.03375068 
## 
## [1] "TR: 5; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.1809, df = 168, p-value = 0.2393
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.0606060  0.2379998
## sample estimates:
##        cor 
## 0.09073595 
## 
## [1] "TR: 6; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.64348, df = 168, p-value = 0.5208
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1986161  0.1016890
## sample estimates:
##         cor 
## -0.04958416 
## 
## [1] "TR: 7; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.5122, df = 168, p-value = 0.1324
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2618275  0.0352491
## sample estimates:
##      cor 
## -0.11588 
## 
## [1] "TR: 8; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.5472, df = 168, p-value = 0.1237
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.26432963  0.03256403
## sample estimates:
##        cor 
## -0.1185312 
## 
## [1] "TR: 9; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.84554, df = 168, p-value = 0.399
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08626267  0.21351897
## sample estimates:
##        cor 
## 0.06509678 
## 
## [1] "TR: 10; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.62483, df = 168, p-value = 0.5329
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1972356  0.1031108
## sample estimates:
##         cor 
## -0.04815076 
## 
## [1] "TR: 11; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.97953, df = 168, p-value = 0.3287
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.22333849  0.07601906
## sample estimates:
##         cor 
## -0.07535742 
## 
## [1] "TR: 12; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.4151, df = 168, p-value = 0.1589
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.25488139  0.04268073
## sample estimates:
##        cor 
## -0.1085307 
## 
## [1] "TR: 13; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.27633, df = 168, p-value = 0.7826
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1712794  0.1296154
## sample estimates:
##         cor 
## -0.02131465
corr_ISC(avg_ISC_fusiform,data_to_plot[,c(1,20)])
## [1] "TR: 1; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.957, df = 168, p-value = 0.003555
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07439591 0.36085343
## sample estimates:
##       cor 
## 0.2224196

## [1] "TR: 2; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.4365, df = 168, p-value = 0.0007426
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1100095 0.3916857
## sample estimates:
##       cor 
## 0.2562803

## [1] "TR: 3; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.3262, df = 168, p-value = 0.1866
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04948583  0.24849381
## sample estimates:
##       cor 
## 0.1017866 
## 
## [1] "TR: 4; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.1757, df = 168, p-value = 0.001779
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09070712 0.37505292
## sample estimates:
##       cor 
## 0.2379724

## [1] "TR: 5; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 4.6454, df = 168, p-value = 6.823e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1968684 0.4643209
## sample estimates:
##       cor 
## 0.3373854

## [1] "TR: 6; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 5.7618, df = 168, p-value = 3.885e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2723409 0.5246422
## sample estimates:
##       cor 
## 0.4062044

## [1] "TR: 7; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 4.8137, df = 168, p-value = 3.284e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2085669 0.4738363
## sample estimates:
##       cor 
## 0.3481519

## [1] "TR: 8; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.919, df = 168, p-value = 0.05668
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.004150015  0.290564854
## sample estimates:
##       cor 
## 0.1464557 
## 
## [1] "TR: 9; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.77777, df = 168, p-value = 0.4378
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09143991  0.20853293
## sample estimates:
##        cor 
## 0.05989873 
## 
## [1] "TR: 10; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.0789, df = 168, p-value = 0.002427
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08350399 0.36879875
## sample estimates:
##       cor 
## 0.2311135

## [1] "TR: 11; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 5.0663, df = 168, p-value = 1.06e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2259176 0.4878359
## sample estimates:
##       cor 
## 0.3640527

## [1] "TR: 12; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.7665, df = 168, p-value = 0.0002287
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1341716 0.4122498
## sample estimates:
##       cor 
## 0.2790505

## [1] "TR: 13; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.0499, df = 168, p-value = 0.002661
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08133945 0.36691431
## sample estimates:
##       cor 
## 0.2290495

DFR

The next step is to look at regions that are actually implicated in working memory.

graph_DFR <- list()

for (TR in seq.int(1,14)){
  data <- data.frame(DFR_ISC_ordered_group[,,TR])
  rownames(data) <- c(1:168)
  colnames(data) <- c(1:168)
  data %>%
    
    # Data wrangling
    as_tibble() %>%
    rowid_to_column(var="X") %>%
    gather(key="Y", value="Z", -1) %>% 
    
    # Change Y to numeric
    mutate(Y=as.numeric(gsub("V","",Y))) -> mutated_data
  # 
  ggplot(data=mutated_data,aes(X, Y, fill= Z)) +
    geom_tile() +
    scale_y_continuous(breaks = c(0,50,100,150),labels=c(0,50,100,150))+
    geom_hline(yintercept=56,color="black")+
    geom_hline(yintercept=113,color="black")+
    geom_vline(xintercept=56,color="black")+
    geom_vline(xintercept=113,color="black")+
    scale_fill_gradient2()+
    theme(aspect=1)+
    ggtitle(paste("TR:",TR))-> graph_DFR[[TR]]
  
  if (TR > 1){
    graph_DFR[[TR]][["theme"]][["legend.position"]] = "none"
  }
  
}

These correlations are not as strong as the fusiform mask, but we still do see an increase in correlations around TRs 5-6 (during encoding)

(graph_DFR[[1]]+graph_DFR[[2]] + graph_DFR[[3]]) +
  plot_layout(guides = "collect")+
  plot_annotation(title="DFR Mask")

(graph_DFR[[4]] + graph_DFR[[5]] + graph_DFR[[6]])

(graph_DFR[[7]] + graph_DFR[[8]] + graph_DFR[[9]])

(graph_DFR[[10]] + graph_DFR[[11]] + graph_DFR[[12]])

(graph_DFR[[13]] + graph_DFR[[14]])

z_trans_DFR <-  atanh(DFR_ISC_ordered_group)
z_trans_DFR[z_trans_DFR==Inf] <- NA
z_trans_corr <- z_trans_DFR

t_test_res_DFR = data.frame(matrix(nrow=14,ncol=2)) 
colnames(t_test_res_DFR) <- c("t value","p value")

group_means_DFR <- data.frame(matrix(nrow=14,ncol=6))
colnames(group_means_DFR) <- cols

group_se_DFR <- data.frame(matrix(nrow=14,ncol=6))
colnames(group_se_DFR) <- cols

avg_over_groups_DFR <- list(mean=data.frame(within = matrix(nrow=14,ncol=1),across = matrix(nrow=14,ncol=1)),
                            se=data.frame(within = matrix(nrow=14,ncol=1),across = matrix(nrow=14,ncol=1)))

for (TR in seq.int(1:14)){
  
  # define dataframes 
  comps <- data.frame(within = matrix(nrow=168,ncol=1),across = matrix(nrow=168,ncol=1))
  
  split_by_groups <- data.frame(matrix(nrow=56,ncol=6))
  colnames(split_by_groups) <- cols
  
  # loop over all subjects and make comparisons
  for (suj in seq.int(1,168)){
    if (suj < 57){
      comps$within[suj] <- mean(z_trans_corr[1:56,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[57:168,suj,TR],na.rm=TRUE)
    }else if (suj > 56 & suj < 113){ 
      comps$within[suj] <- mean(z_trans_corr[57:112,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[c(1:56,113:168),suj,TR],na.rm=TRUE)
    }else if (suj > 112){ 
      comps$within[suj] <- mean(z_trans_corr[113:168,suj,TR],na.rm=TRUE)
      comps$across[suj] <- mean(z_trans_corr[1:112,suj,TR],na.rm=TRUE)}
    
  }
  
  # average over groups 
  avg_over_groups_DFR[["mean"]]$within[TR] <- mean(comps$within)
  avg_over_groups_DFR[["mean"]]$across[TR] <- mean(comps$across)
  avg_over_groups_DFR[["se"]]$within[TR] <- se(comps$within)
  avg_over_groups_DFR[["se"]]$across[TR] <- se(comps$across)
  
  avg_over_groups_DFR[["mean"]]$difference[TR] <- avg_over_groups_DFR[["mean"]]$within[TR] - avg_over_groups_DFR[["mean"]]$across[TR]
  avg_over_groups_DFR[["se"]]$difference[TR] <- se(comps$within - comps$across)
  
  # split by groups 
  split_by_groups$low_across <- comps$across[1:56]
  split_by_groups$low_within <- comps$within[1:56]
  
  split_by_groups$med_across <- comps$across[57:112]
  split_by_groups$med_within <- comps$within[57:112]
  
  split_by_groups$high_across <- comps$across[113:168]
  split_by_groups$high_within <- comps$within[113:168]
  
  group_means_DFR[TR,] <- colMeans(split_by_groups)
  for (group in seq.int(1,6)){
    group_se_DFR[TR,group] <- se(split_by_groups[,group])
  }
  
  temp2 <- t.test(comps$within,comps$across,paired=TRUE,var.equal = FALSE)
  t_test_res_DFR[TR,] <- c(temp2$statistic,temp2$p.value)
  
}

All time points are significantly different.

print(t_test_res_DFR)
##     t value      p value
## 1  10.62819 1.769375e-20
## 2  10.75847 7.684782e-21
## 3  11.57843 3.906112e-23
## 4  11.14335 6.481272e-22
## 5  12.43721 1.488099e-25
## 6  11.82523 7.901208e-24
## 7  12.68754 2.924909e-26
## 8  11.74914 1.293633e-23
## 9  12.67752 3.121740e-26
## 10 11.88681 5.300672e-24
## 11 11.09377 8.919037e-22
## 12 11.86393 6.148470e-24
## 13 13.22862 8.690418e-28
## 14 11.53691 5.109548e-23

Reflecting that, we’re seeing lower correlations, but a similar effect that within group correlations are higher than across group. However, we’re not seeing as much of a bump in the probe period, and the peak in the encoding is slightly later than in the fusiform region.

plot_temp <- melt(cbind(avg_over_groups_DFR[["mean"]],time=c(1:14)),id.vars="time")[1:28,]
se_plot_temp <- melt(cbind(avg_over_groups_DFR[["se"]],time=c(1:14)),id.vars="time")[1:28,]
plot_temp <- merge(plot_temp,se_plot_temp,by=c("time","variable"))
colnames(plot_temp) <- c("time","variable","mean","se")

ggplot(data=plot_temp)+
  geom_line(aes(x=time,y=mean,color=variable))+
  geom_ribbon(aes(x=time,ymin=mean-se,ymax=mean+se,fill=variable),alpha=0.2)+
  ggtitle("DFR ISC - regardless of WM group")

At the beginning of the probe period, we’re starting to see potential differences across groups - it almost looks as though there is higher within subject correlations in the medium and high capacity subjects vs low capacity subjects during the probe period. Will need to do further stats to see if this is statistically significant.

group_means_DFR$TR <- c(1:14) 
group_se_DFR$TR <- c(1:14) 

melted_group <-  melt(group_means_DFR, id.vars="TR",value.name="mean")
melted_se <- melt(group_se_DFR,id.vars="TR",value.name="se")

merge(melted_group,melted_se) %>% 
  ggplot()+
  geom_rect(data=rects,aes(xmin=xstart, xmax=xend, ymin = -Inf, ymax=Inf), fill="grey", alpha =0.4,show.legend = FALSE)+
  geom_line(aes(x=TR,y=mean,color=variable))+
  geom_ribbon(aes(x=TR,ymin=mean-se,ymax=mean+se,fill=variable),alpha=0.2)+
  scale_x_continuous(breaks = c(1:14),labels=c(1:14))+
  ggtitle("DFR ISC")+
  theme_classic() -> graph

graph

If we take the same plan of attack as before and look at the correlation between ISC averaged over the whole time course and cognitive/clinical measures, we’re seeing the same thing - nothing except a very strong correlation with performance.

cor.test(overall_avg_ISC_DFR,data_to_plot$omnibus_span_no_DFR_MRI)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_DFR and data_to_plot$omnibus_span_no_DFR_MRI
## t = 1.0317, df = 168, p-value = 0.3037
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07202695  0.22714894
## sample estimates:
##        cor 
## 0.07934751
cor.test(overall_avg_ISC_DFR,data_to_plot$XDFR_MRI_ACC_L3)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_DFR and data_to_plot$XDFR_MRI_ACC_L3
## t = 5.5685, df = 168, p-value = 1e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2596474 0.5146711
## sample estimates:
##       cor 
## 0.3947352
cor.test(overall_avg_ISC_DFR,data_to_plot$WHO_ST_S32)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_DFR and data_to_plot$WHO_ST_S32
## t = -0.77335, df = 168, p-value = 0.4404
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20820677  0.09177802
## sample estimates:
##         cor 
## -0.05955898
cor.test(overall_avg_ISC_DFR,data_to_plot$BPRS_TOT)
## 
##  Pearson's product-moment correlation
## 
## data:  overall_avg_ISC_DFR and data_to_plot$BPRS_TOT
## t = -0.75607, df = 168, p-value = 0.4507
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2069336  0.0930971
## sample estimates:
##         cor 
## -0.05823314
ggplot(data=data_to_plot,aes(x=overall_avg_ISC_DFR,omnibus_span_no_DFR_MRI))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC DFR vs omnibus span")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_DFR,XDFR_MRI_ACC_L3))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC DFR vs L3 DFR Acc")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_DFR,WHO_ST_S32))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC DFR vs WHODAS")

ggplot(data=data_to_plot,aes(x=overall_avg_ISC_DFR,BPRS_TOT))+
  geom_point()+
  stat_smooth(method="lm")+
  ggtitle("Avg ISC DFR vs BPRS Total")

If we break it down by TR, we again see correlations between ISC in the DFR regions and omnibus span at TR 10 and 11, WHODAS at TR 10 (but same concerns as above), and accuracy at TRs 1, 2, 4, 5, 6, 7, 10, 11, 12, and 13.

corr_ISC(avg_ISC_DFR,data_to_plot[,c(1,7)])
## [1] "TR: 1; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.2683, df = 168, p-value = 0.2064
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05391824  0.24431936
## sample estimates:
##        cor 
## 0.09738635 
## 
## [1] "TR: 2; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.75685, df = 168, p-value = 0.4502
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09303749  0.20699119
## sample estimates:
##        cor 
## 0.05829306 
## 
## [1] "TR: 3; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.24746, df = 168, p-value = 0.8049
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1318047  0.1691166
## sample estimates:
##        cor 
## 0.01908822 
## 
## [1] "TR: 4; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.57404, df = 168, p-value = 0.5667
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1069822  0.1934704
## sample estimates:
##       cor 
## 0.0442445 
## 
## [1] "TR: 5; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.50633, df = 168, p-value = 0.6133
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1121385  0.1884417
## sample estimates:
##        cor 
## 0.03903458 
## 
## [1] "TR: 6; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.44078, df = 168, p-value = 0.6599
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1171262  0.1835624
## sample estimates:
##        cor 
## 0.03398721 
## 
## [1] "TR: 7; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.74526, df = 168, p-value = 0.4572
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09392242  0.20613655
## sample estimates:
##        cor 
## 0.05740332 
## 
## [1] "TR: 8; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.32444, df = 168, p-value = 0.746
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1259652  0.1748791
## sample estimates:
##        cor 
## 0.02502352 
## 
## [1] "TR: 9; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.14285, df = 168, p-value = 0.8866
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1397255  0.1612673
## sample estimates:
##       cor 
## 0.0110205 
## 
## [1] "TR: 10; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.1608, df = 168, p-value = 0.03212
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01428222 0.30735000
## sample estimates:
##      cor 
## 0.164443

## [1] "TR: 11; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.2695, df = 168, p-value = 0.02451
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.02254113 0.31481220
## sample estimates:
##       cor 
## 0.1724702

## [1] "TR: 12; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.37686, df = 168, p-value = 0.7068
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1219848  0.1787952
## sample estimates:
##        cor 
## 0.02906309 
## 
## [1] "TR: 13; measure: omnibus_span_no_DFR_MRI"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.25791, df = 168, p-value = 0.7968
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1698995  0.1310125
## sample estimates:
##         cor 
## -0.01989402
corr_ISC(avg_ISC_DFR,data_to_plot[,c(1,8)])
## [1] "TR: 1; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.083989, df = 168, p-value = 0.9332
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1568411  0.1441751
## sample estimates:
##         cor 
## -0.00647977 
## 
## [1] "TR: 2; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.35747, df = 168, p-value = 0.7212
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1234574  0.1773474
## sample estimates:
##        cor 
## 0.02756911 
## 
## [1] "TR: 3; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.28112, df = 168, p-value = 0.779
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1292525  0.1716377
## sample estimates:
##        cor 
## 0.02168359 
## 
## [1] "TR: 4; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.56962, df = 168, p-value = 0.5697
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1931424  0.1073189
## sample estimates:
##         cor 
## -0.04390453 
## 
## [1] "TR: 5; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.66307, df = 168, p-value = 0.5082
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2000657  0.1001948
## sample estimates:
##         cor 
## -0.05108995 
## 
## [1] "TR: 6; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.96747, df = 168, p-value = 0.3347
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.22245664  0.07694159
## sample estimates:
##         cor 
## -0.07443467 
## 
## [1] "TR: 7; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.44912, df = 168, p-value = 0.6539
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1841842  0.1164915
## sample estimates:
##         cor 
## -0.03462992 
## 
## [1] "TR: 8; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.069995, df = 168, p-value = 0.9443
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1452322  0.1557878
## sample estimates:
##         cor 
## 0.005400146 
## 
## [1] "TR: 9; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.64648, df = 168, p-value = 0.5189
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1988384  0.1014600
## sample estimates:
##         cor 
## -0.04981498 
## 
## [1] "TR: 10; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -2.8258, df = 168, p-value = 0.005289
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.35223211 -0.06456666
## sample estimates:
##        cor 
## -0.2130108

## [1] "TR: 11; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.2692, df = 168, p-value = 0.2061
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2443870  0.0538465
## sample estimates:
##         cor 
## -0.09745762 
## 
## [1] "TR: 12; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.7545, df = 168, p-value = 0.4516
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20681817  0.09321668
## sample estimates:
##         cor 
## -0.05811292 
## 
## [1] "TR: 13; measure: WHO_ST_S32"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.33882, df = 168, p-value = 0.7352
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1248736  0.1759540
## sample estimates:
##        cor 
## 0.02613178
corr_ISC(avg_ISC_DFR,data_to_plot[,c(1,14)])
## [1] "TR: 1; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.7782, df = 168, p-value = 0.4375
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.20856475  0.09140692
## sample estimates:
##         cor 
## -0.05993188 
## 
## [1] "TR: 2; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.38731, df = 168, p-value = 0.699
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1795752  0.1211909
## sample estimates:
##         cor 
## -0.02986822 
## 
## [1] "TR: 3; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.2806, df = 168, p-value = 0.2021
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.24520652  0.05297723
## sample estimates:
##         cor 
## -0.09832101 
## 
## [1] "TR: 4; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.43771, df = 168, p-value = 0.6622
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1173598  0.1833336
## sample estimates:
##        cor 
## 0.03375068 
## 
## [1] "TR: 5; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.1809, df = 168, p-value = 0.2393
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.0606060  0.2379998
## sample estimates:
##        cor 
## 0.09073595 
## 
## [1] "TR: 6; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.64348, df = 168, p-value = 0.5208
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1986161  0.1016890
## sample estimates:
##         cor 
## -0.04958416 
## 
## [1] "TR: 7; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.5122, df = 168, p-value = 0.1324
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2618275  0.0352491
## sample estimates:
##      cor 
## -0.11588 
## 
## [1] "TR: 8; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.5472, df = 168, p-value = 0.1237
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.26432963  0.03256403
## sample estimates:
##        cor 
## -0.1185312 
## 
## [1] "TR: 9; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.84554, df = 168, p-value = 0.399
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08626267  0.21351897
## sample estimates:
##        cor 
## 0.06509678 
## 
## [1] "TR: 10; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.62483, df = 168, p-value = 0.5329
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1972356  0.1031108
## sample estimates:
##         cor 
## -0.04815076 
## 
## [1] "TR: 11; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.97953, df = 168, p-value = 0.3287
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.22333849  0.07601906
## sample estimates:
##         cor 
## -0.07535742 
## 
## [1] "TR: 12; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -1.4151, df = 168, p-value = 0.1589
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.25488139  0.04268073
## sample estimates:
##        cor 
## -0.1085307 
## 
## [1] "TR: 13; measure: BPRS_TOT"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = -0.27633, df = 168, p-value = 0.7826
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1712794  0.1296154
## sample estimates:
##         cor 
## -0.02131465
corr_ISC(avg_ISC_DFR,data_to_plot[,c(1,20)])
## [1] "TR: 1; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 2.957, df = 168, p-value = 0.003555
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07439591 0.36085343
## sample estimates:
##       cor 
## 0.2224196

## [1] "TR: 2; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.4365, df = 168, p-value = 0.0007426
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1100095 0.3916857
## sample estimates:
##       cor 
## 0.2562803

## [1] "TR: 3; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.3262, df = 168, p-value = 0.1866
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04948583  0.24849381
## sample estimates:
##       cor 
## 0.1017866 
## 
## [1] "TR: 4; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.1757, df = 168, p-value = 0.001779
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09070712 0.37505292
## sample estimates:
##       cor 
## 0.2379724

## [1] "TR: 5; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 4.6454, df = 168, p-value = 6.823e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1968684 0.4643209
## sample estimates:
##       cor 
## 0.3373854

## [1] "TR: 6; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 5.7618, df = 168, p-value = 3.885e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2723409 0.5246422
## sample estimates:
##       cor 
## 0.4062044

## [1] "TR: 7; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 4.8137, df = 168, p-value = 3.284e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2085669 0.4738363
## sample estimates:
##       cor 
## 0.3481519

## [1] "TR: 8; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 1.919, df = 168, p-value = 0.05668
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.004150015  0.290564854
## sample estimates:
##       cor 
## 0.1464557 
## 
## [1] "TR: 9; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 0.77777, df = 168, p-value = 0.4378
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.09143991  0.20853293
## sample estimates:
##        cor 
## 0.05989873 
## 
## [1] "TR: 10; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.0789, df = 168, p-value = 0.002427
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08350399 0.36879875
## sample estimates:
##       cor 
## 0.2311135

## [1] "TR: 11; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 5.0663, df = 168, p-value = 1.06e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2259176 0.4878359
## sample estimates:
##       cor 
## 0.3640527

## [1] "TR: 12; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.7665, df = 168, p-value = 0.0002287
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1341716 0.4122498
## sample estimates:
##       cor 
## 0.2790505

## [1] "TR: 13; measure: XDFR_MRI_ACC_L3"
## 
##  Pearson's product-moment correlation
## 
## data:  TR_data[, TR] and measure[, 2]
## t = 3.0499, df = 168, p-value = 0.002661
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08133945 0.36691431
## sample estimates:
##       cor 
## 0.2290495